package darknet.core.spec.net;

import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;

/**
 * A streamble message.
 * 
 * @author Yoyo
 */
public interface StreamableMessage {

    /**
     * Get the wrapped message.
     * @return
     */
    Message getWrapped();
    
    /**
     * Get input stream.
     * @return
     */
    InputStream getInput();
    
    /**
     * Get output stream.
     * @return
     */
    OutputStream getOutput();
    
    /**
     * Close both input and output stream.
     */
    void close() throws IOException ;
}
